//
//  UIImageView+WebImage.swift
//  WeiBo
//
//  Created by Li MAc on 2018/12/1.
//  Copyright © 2018 Li MAc. All rights reserved.
//

import SDWebImage

extension UIImageView {
    func setImage(urlString:String?,placeholderImage:UIImage?){
        guard let urlString = urlString,let url = URL(string: urlString) else{
            image = placeholderImage
            return
        }
        
        sd_setImage(with: url, placeholderImage: placeholderImage, options: [], progress: nil) { (image, _, _, _) in
            
        }
    }
    
    
}
